package org.mechanic.exception;

import org.mechanic.core.web.HttpStatusCode;

/**
 * 登陆异常
 */
public class LoginException extends BaseException {
    public LoginException() {
    }

    public LoginException(HttpStatusCode httpStatusCode, String message) {
        super(HttpStatusCode.defineHttpStatusCode(httpStatusCode, message));
        httpStatusCode.setMessage(message);
    }

    public LoginException(String message) {
        this(HttpStatusCode.defineHttpStatusCode(message));
    }

    public LoginException(String message, Exception e) {
        super(message, e);
    }

    public LoginException(HttpStatusCode httpStatusCode, Exception e) {
        super(httpStatusCode, e);
    }

    public LoginException(HttpStatusCode httpStatusCode) {
        super(httpStatusCode);
    }

    protected HttpStatusCode getHttpStatusCode() {
        return HttpStatusCode.LOGIN_FAIL;
    }
}
